/*
 * tela_principal.java
 *
 * 
 *  LICENÇA CC-GNU LGPL
 * 
 * EXCLUSÃO DE GARANTIA 
1.COMO A BIBLIOTECA É LICENCIADA ELA TERÁ TOTAL GARANTIA DE SUPORTE TÉCNICO,
  MAS CASO O CÓDIGO-FONTE SOFRA ALTERAÇÕES, NÃO HAVERÁ NENHUMA GARANTIA PARA A 
  BIBLIOTECA, NO LIMITE PERMITIDO PELA LEI APLICÁVEL. EXCETO QUANDO DE OUTRA FORMA
  ESTABELECIDO POR ESCRITO, OS TITULARES DOS DIREITOS AUTORAIS E/OU OUTRAS PARTES 
  FORNECEM A BIBLIOTECA "NO ESTADO EM QUE SE ENCONTRA", SEM NENHUMA GARANTIA DE 
  QUALQUER TIPO, TANTO EXPRESSA COMO IMPLÍCITA, INCLUINDO, DENTRE OUTRAS, AS GARANTIAS
  IMPLÍCITAS DE COMERCIABILIDADE E ADEQUAÇÃO PARA UMA FINALIDADE ESPECÍFICA. 
  O RISCO INTEGRAL QUANTO À QUALIDADE E DESEMPENHO DA BIBLIOTECA É ASSUMIDO POR VOCÊ.
  CASO A BIBLIOTECA CONTENHA DEFEITOS, VOCÊ ARCARÁ COM OS CUSTOS DE TODOS OS SERVIÇOS,
  REPAROS OU CORREÇÕES NECESSÁRIAS. 

 2.EM NENHUMA CIRCUNSTÂNCIA, A MENOS QUE EXIGIDO PELA LEI APLICÁVEL OU ACORDADO POR 
   ESCRITO, QUALQUER TITULAR DE DIREITOS AUTORAIS OU QUALQUER OUTRA PARTE QUE POSSA 
   MODIFICAR E/OU REDISTRIBUIR A BIBLIOTECA, CONFORME PERMITIDO ACIMA, SERÁ RESPONSÁVEL 
   PARA COM VOCÊ POR DANOS, INCLUINDO ENTRE OUTROS QUAISQUER DANOS GERAIS, ESPECIAIS, 
   FORTUITOS OU EMERGENTES, ADVINDOS DO USO OU IMPOSSIBILIDADE DE USO DA BIBLIOTECA 
   (INCLUINDO, ENTRE OUTROS, PERDA DE DADOS, DADOS SENDO GERADOS DE FORMA IMPRECISA, 
   PERDAS SOFRIDAS POR VOCÊ OU TERCEIROS OU A IMPOSSIBILIDADE DA BIBLIOTECA DE OPERAR 
   COM QUALQUER OUTRO SOFTWARE), MESMO QUE ESSE TITULAR, OU OUTRA PARTE, TENHA SIDO 
   AVISADO SOBRE A POSSIBILIDADE DESSES DANOS.
 * 
 * Created on 4 de Novembro de 2008, 20:45
 */

package principal;

import cadastros.*;
import utilitarios.*;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

/**
 *
 * @author  Shinigami
 */
public class tela_principal extends javax.swing.JFrame {

    String seta_look = "com.birosoft.liquid.LiquidLookAndFeel";
    data mostra_data;
    /** Creates new form tela_principal */
    public tela_principal() {
        initComponents();
        mostra_data = new data();
        mostra_data.le_data();
        label_data.setText(mostra_data.dia+"/"+mostra_data.mes+"/"+mostra_data.ano);
        
       
        
       
        
        timer1.start();
        lookandfeel();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jFrame1 = new javax.swing.JFrame();
        timer1 = new org.netbeans.examples.lib.timerbean.Timer();
        jPanel1 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        bt_tipo = new javax.swing.JButton();
        bt_maq = new javax.swing.JButton();
        bt_set = new javax.swing.JButton();
        bt_fmt = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        lbusuario = new javax.swing.JLabel();
        label_data = new javax.swing.JLabel();
        label_hora = new javax.swing.JLabel();
        lbnivel = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        bt_user = new javax.swing.JButton();
        lbuser = new javax.swing.JLabel();
        bt_helps = new javax.swing.JButton();
        lb_helps = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        m_cadastros = new javax.swing.JMenu();
        mi_tipo = new javax.swing.JMenuItem();
        mi_setor = new javax.swing.JMenuItem();
        mi_maq = new javax.swing.JMenuItem();
        mi_fer = new javax.swing.JMenuItem();
        jm_user = new javax.swing.JMenuItem();
        jm_helps = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JSeparator();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();

        javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
        jFrame1.getContentPane().setLayout(jFrame1Layout);
        jFrame1Layout.setHorizontalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jFrame1Layout.setVerticalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        timer1.addTimerListener(new org.netbeans.examples.lib.timerbean.TimerListener() {
            public void onTime(java.awt.event.ActionEvent evt) {
                timer1OnTime(evt);
            }
        });

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Sistema de Inventário e Suporte Técnico  v. 1.1.7");
        setBackground(new java.awt.Color(255, 255, 255));
        setResizable(false);

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));

        jLabel5.setText("<html><b>Cadastro de Tipos de Ferramentas</b><br>\n<i>Pressione a tecla F2 para abrir o <br>\nformulário.</i></html>");
        jLabel5.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        jLabel5.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel5MouseClicked(evt);
            }
        });

        jLabel6.setText("<html><b>Cadastro de Estações de Trabalho</b><br>\n<i>Pressione a tecla F4 para abrir o <br>\nformulário.</i></html>");
        jLabel6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel6MouseClicked(evt);
            }
        });

        jLabel7.setText("<html><b>Cadastro de Setores de Trabalho</b><br>\n<i>Pressione a tecla F3 para abrir o <br>\nformulário.</i></html>");
        jLabel7.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel7MouseClicked(evt);
            }
        });

        jLabel8.setText("<html><b>Cadastro de Estoque de Ferramentas</b><br>\n<i>Pressione a tecla F5 para abrir o <br>\nformulário.</i></html>");
        jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel8MouseClicked(evt);
            }
        });

        bt_tipo.setBackground(new java.awt.Color(204, 204, 204));
        bt_tipo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/tipos.png"))); // NOI18N
        bt_tipo.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        bt_tipo.setOpaque(false);
        bt_tipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_tipoActionPerformed(evt);
            }
        });

        bt_maq.setBackground(new java.awt.Color(255, 255, 255));
        bt_maq.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/cad_maq.png"))); // NOI18N
        bt_maq.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        bt_maq.setOpaque(false);
        bt_maq.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_maqActionPerformed(evt);
            }
        });

        bt_set.setBackground(new java.awt.Color(204, 204, 204));
        bt_set.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/setor.png"))); // NOI18N
        bt_set.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        bt_set.setOpaque(false);
        bt_set.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_setActionPerformed(evt);
            }
        });

        bt_fmt.setBackground(new java.awt.Color(204, 204, 204));
        bt_fmt.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/ferramentas.png"))); // NOI18N
        bt_fmt.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        bt_fmt.setOpaque(false);
        bt_fmt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_fmtActionPerformed(evt);
            }
        });

        jPanel2.setBackground(new java.awt.Color(38, 126, 38));
        jPanel2.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), javax.swing.BorderFactory.createEtchedBorder()));

        lbusuario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Usuário", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 0, 0))); // NOI18N

        label_data.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Data", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 0, 0))); // NOI18N

        label_hora.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Hora", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 0, 0))); // NOI18N

        lbnivel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Nível", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 0, 0))); // NOI18N

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/hflogo.png"))); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(label_hora, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)
                            .addComponent(label_data, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE))
                        .addGap(22, 22, 22))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lbusuario, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)
                            .addComponent(lbnivel, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE))
                        .addContainerGap())
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)
                        .addContainerGap())))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
                .addComponent(lbusuario)
                .addGap(18, 18, 18)
                .addComponent(lbnivel)
                .addGap(21, 21, 21)
                .addComponent(label_data, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(label_hora)
                .addGap(38, 38, 38))
        );

        bt_user.setBackground(new java.awt.Color(255, 255, 255));
        bt_user.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/user.png"))); // NOI18N
        bt_user.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        bt_user.setOpaque(false);
        bt_user.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_userActionPerformed(evt);
            }
        });

        lbuser.setText("<html><b>Cadastro de Usuário</b><br> <i>Pressione a tecla F6 para abrir o <br> formulário.</i></html>");
        lbuser.setFocusable(false);
        lbuser.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbuserMouseClicked(evt);
            }
        });

        bt_helps.setBackground(new java.awt.Color(255, 255, 255));
        bt_helps.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/help.png"))); // NOI18N
        bt_helps.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
        bt_helps.setOpaque(false);
        bt_helps.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_helpsActionPerformed(evt);
            }
        });

        lb_helps.setText("<html><b>HelpDesk Server</b><br> <i>Pressione a tecla F7 para abrir o <br> formulário.</i></html>");
        lb_helps.setFocusable(false);
        lb_helps.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lb_helpsMouseClicked(evt);
            }
        });

        jPanel3.setBackground(new java.awt.Color(38, 126, 38));
        jPanel3.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), javax.swing.BorderFactory.createEtchedBorder()));

        jLabel2.setBackground(new java.awt.Color(38, 126, 38));
        jLabel2.setFont(new java.awt.Font("Tahoma", 2, 11));
        jLabel2.setText("COPYRIGHT © 2009, J. H. Chiumarelli, R. L. Fernandes");

        jLabel1.setText("Tels.: (019)9288-8192/9710-4308");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addGap(28, 28, 28)
                .addComponent(jLabel1)
                .addContainerGap(97, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel1))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(30, 30, 30)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(bt_maq, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel6))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(bt_user, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lbuser))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(bt_tipo, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel5)))
                        .addGap(32, 32, 32)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(bt_set, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel7))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(bt_fmt, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel8))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(bt_helps, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lb_helps))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(36, 36, 36)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(bt_tipo, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5)
                            .addComponent(jLabel7)
                            .addComponent(bt_set, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(29, 29, 29)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8)
                            .addComponent(bt_fmt, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6)
                            .addComponent(bt_maq, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(30, 30, 30)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lb_helps)
                            .addComponent(bt_helps, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbuser)
                            .addComponent(bt_user, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        lbuser.getAccessibleContext().setAccessibleName("<html><b>Cadastro de Usuários</b><br>\n<i>Pressione a tecla F6 para abrir o <br>\nformulário.</i></html>");

        m_cadastros.setText("Cadastros");

        mi_tipo.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, 0));
        mi_tipo.setText("Tipo");
        mi_tipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mi_tipoActionPerformed(evt);
            }
        });
        m_cadastros.add(mi_tipo);

        mi_setor.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F3, 0));
        mi_setor.setText("Setores");
        mi_setor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mi_setorActionPerformed(evt);
            }
        });
        m_cadastros.add(mi_setor);

        mi_maq.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, 0));
        mi_maq.setText("Máquinas");
        mi_maq.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mi_maqActionPerformed(evt);
            }
        });
        m_cadastros.add(mi_maq);

        mi_fer.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
        mi_fer.setText("Ferramentas");
        mi_fer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mi_ferActionPerformed(evt);
            }
        });
        m_cadastros.add(mi_fer);

        jm_user.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6, 0));
        jm_user.setText("Usuário");
        jm_user.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jm_userActionPerformed(evt);
            }
        });
        m_cadastros.add(jm_user);

        jm_helps.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F7, 0));
        jm_helps.setText("HelpDesk");
        jm_helps.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jm_helpsActionPerformed(evt);
            }
        });
        m_cadastros.add(jm_helps);
        m_cadastros.add(jSeparator1);

        jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F12, 0));
        jMenuItem2.setText("Sair");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        m_cadastros.add(jMenuItem2);

        jMenuBar1.add(m_cadastros);

        jMenu1.setText("Sobre");
        jMenu1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jMenu1MouseClicked(evt);
            }
        });
        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 784, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-792)/2, (screenSize.height-462)/2, 792, 462);
    }// </editor-fold>//GEN-END:initComponents

private void mi_tipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mi_tipoActionPerformed

     new cad_tipo().setVisible(true);
    
}//GEN-LAST:event_mi_tipoActionPerformed

private void mi_setorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mi_setorActionPerformed

     new cad_setores().setVisible(true);
         
}//GEN-LAST:event_mi_setorActionPerformed

private void mi_maqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mi_maqActionPerformed

     new cad_maq().setVisible(true);
    
}//GEN-LAST:event_mi_maqActionPerformed

private void mi_ferActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mi_ferActionPerformed

     new cad_ferramentas().setVisible(true);
    
}//GEN-LAST:event_mi_ferActionPerformed

private void jLabel5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel5MouseClicked

    new cad_tipo().setVisible(true);
    
    
}//GEN-LAST:event_jLabel5MouseClicked

private void jLabel6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel6MouseClicked

    new cad_maq().setVisible(true);
    
    
}//GEN-LAST:event_jLabel6MouseClicked

private void jLabel7MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel7MouseClicked

    new cad_setores().setVisible(true);
    
    
}//GEN-LAST:event_jLabel7MouseClicked

private void jLabel8MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel8MouseClicked

    new cad_ferramentas().setVisible(true);
    
}//GEN-LAST:event_jLabel8MouseClicked

private void bt_tipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_tipoActionPerformed

    new cad_tipo().setVisible(true);    
    
}//GEN-LAST:event_bt_tipoActionPerformed

private void bt_maqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_maqActionPerformed

    new cad_maq().setVisible(true);
    
}//GEN-LAST:event_bt_maqActionPerformed

private void bt_setActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_setActionPerformed

    new cad_setores().setVisible(true);
    
}//GEN-LAST:event_bt_setActionPerformed

private void bt_fmtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_fmtActionPerformed

    new cad_ferramentas().setVisible(true);
        
    
}//GEN-LAST:event_bt_fmtActionPerformed

private void timer1OnTime(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_timer1OnTime
 mostra_data.le_hora();
    label_hora.setText(mostra_data.hora );
}//GEN-LAST:event_timer1OnTime

private void bt_userActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_userActionPerformed
new cad_user().setVisible(true);
}//GEN-LAST:event_bt_userActionPerformed

private void lbuserMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbuserMouseClicked
new cad_user().setVisible(true);
}//GEN-LAST:event_lbuserMouseClicked

private void jm_userActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jm_userActionPerformed

    bt_userActionPerformed(evt);
    
}//GEN-LAST:event_jm_userActionPerformed

private void bt_helpsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_helpsActionPerformed

    new hd_principal().setVisible(true);
    
}//GEN-LAST:event_bt_helpsActionPerformed

private void lb_helpsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_helpsMouseClicked

    new hd_principal().setVisible(true);
    
}//GEN-LAST:event_lb_helpsMouseClicked

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed

    hd_principal.jm_voltar.setEnabled(true);
    setVisible(false);
    
}//GEN-LAST:event_jMenuItem2ActionPerformed

private void jm_helpsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jm_helpsActionPerformed

    new hd_principal().setVisible(true);
    
}//GEN-LAST:event_jm_helpsActionPerformed

private void jMenu1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu1MouseClicked

    new Sobre().setVisible(true);
    
}//GEN-LAST:event_jMenu1MouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new tela_principal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton bt_fmt;
    public static javax.swing.JButton bt_helps;
    private javax.swing.JButton bt_maq;
    private javax.swing.JButton bt_set;
    private javax.swing.JButton bt_tipo;
    public static javax.swing.JButton bt_user;
    private javax.swing.JFrame jFrame1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JSeparator jSeparator1;
    public static javax.swing.JMenuItem jm_helps;
    public static javax.swing.JMenuItem jm_user;
    public static javax.swing.JLabel label_data;
    private javax.swing.JLabel label_hora;
    public static javax.swing.JLabel lb_helps;
    public static javax.swing.JLabel lbnivel;
    public static javax.swing.JLabel lbuser;
    public static javax.swing.JLabel lbusuario;
    private javax.swing.JMenu m_cadastros;
    private javax.swing.JMenuItem mi_fer;
    private javax.swing.JMenuItem mi_maq;
    private javax.swing.JMenuItem mi_setor;
    private javax.swing.JMenuItem mi_tipo;
    private org.netbeans.examples.lib.timerbean.Timer timer1;
    // End of variables declaration//GEN-END:variables

     public void lookandfeel()
     
    {
             
         try
        {
            //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
            //UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel");
            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
            UIManager.setLookAndFeel(seta_look);
            SwingUtilities.updateComponentTreeUI(this);
            
        }        
        catch(Exception erro)
        {
            JOptionPane.showMessageDialog(null,erro);
        
        } 
        }        
       
    
    
}
